<?php /* Smarty version 2.6.27, created on 2019-11-04 17:58:32
         compiled from notice/add.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 't', 'notice/add.tpl', 43, false),)), $this); ?>
<form method="post" id="form_submit" action="admin.php?ctrl=notice&act=submit&type=add">
    <table class="itable itable-color">
        <tr>
            <td>公告内容</td>
            <td>
                <textarea class="notice_content" style="width: 800px;height:100px" name="content" value=""></textarea>
            </td>
        </tr>
        <tr>
            <td>类型</td>
            <td>
                <select name="notice_type">
                    <?php $_from = $this->_tpl_vars['noticeType']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['item']):
?>
                    <option value="<?php echo $this->_tpl_vars['key']; ?>
"><?php echo $this->_tpl_vars['item']; ?>
</option>
                    <?php endforeach; endif; unset($_from); ?>
                </select>
            </td>
        </tr>

        <tr>
            <td>开始时间</td>
            <td><input type="text" name="stime" value="" class="datetimepicker" ></td>
        </tr>

        <tr>
            <td>结束时间</td>
            <td><input type="text" name="etime" value="" class="datetimepicker" ></td>
        </tr>

        <tr>
            <td>时间间隔</td>
            <td><input type="text" name="time_interval" value="" >(以秒为单位)</td>
        </tr>

        <tr>
            <td>服务器</td>
            <td><?php echo $this->_tpl_vars['server']; ?>
</td>
        </tr>

        <tr>
            <td></td>
            <td>
                <input type="submit" class="gbutton" value="<?php echo ((is_array($_tmp='提交')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
"/>
                <input type="reset"  class="gbutton" value="<?php echo ((is_array($_tmp='重置')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
"/>
            </td>
        </tr>
    </table>
</form>


<script type="text/javascript">
    var timepickerlang = {timeText: '<?php echo ((is_array($_tmp='时间')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', hourText: '<?php echo ((is_array($_tmp='小时')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', minuteText: '<?php echo ((is_array($_tmp='分钟')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', secondText: '<?php echo ((is_array($_tmp='秒钟')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', currentText: '<?php echo ((is_array($_tmp='现在')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', closeText: '<?php echo ((is_array($_tmp='确定')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
'}
            $('.datetimepicker').datetimepicker(timepickerlang);

    $('#form_submit').ajaxForm({
        complete: function(xhr) {
            var result = xhr.responseText;
            $('#form_submit reset').trigger('click');
            if(result == 'success'){
                $tabs.tabs("select", 1);
                $tabs.tabs("load", 1);
            }else{
                $.dialog.alert(result);
            }

        }
    });


</script>